package android.tusnotas.parser.group;

import android.tusnotas.beans.Group;
import android.tusnotas.beans.GroupFile;
import android.tusnotas.beans.GroupMessage;
import android.tusnotas.beans.Person;

import com.thoughtworks.xstream.XStream;

public class GroupXStream  extends XStream{
	public GroupXStream(){
		this.aliasType("Grupo", Group.class);
		this.aliasField("ID", Group.class, "id");
		this.aliasField("Nombre", Group.class, "name");
		
		//Person Configuration
		this.aliasField("Integrantes", Group.class, "persons");
		this.aliasType("Persona", Person.class);
		this.aliasField("Nombre", Person.class, "name");
		
		//Message Configuration
		this.aliasField("Mensajes", Group.class, "messages");
		this.aliasType("Mensaje", GroupMessage.class);
		this.aliasField("Usuario", GroupMessage.class, "user");
		this.aliasField("Fecha", GroupMessage.class, "date");
		this.aliasField("Texto", GroupMessage.class, "text");
		
		//Files Configuration
		this.aliasField("Archivos", Group.class, "files");
		this.aliasType("Archivo", GroupFile.class);
		this.aliasField("Nombre", GroupFile.class, "name");
		this.aliasField("Link", GroupFile.class, "link");
		this.aliasField("Extension", GroupFile.class, "extension");
		this.aliasField("Size", GroupFile.class, "size");
		this.aliasField("Fecha", GroupFile.class, "date");
		this.aliasField("NameUploader", GroupFile.class, "uploaderName");
		
	}
}
